<?php


namespace seecms\lib\builder\control;

class DividerControl extends Control
{
    protected $type = 'divider';

    public function render(): string
    {


        $label = $this->label;

        if ($label) {
            $label = <<<EOF
<div class="site-title">
        <fieldset>
            <legend>
                <a name="blockquote">{$label}</a>
            </legend>
        </fieldset>
    </div>
EOF;

        } else {
            $label = <<<EOF
<div class="mb20">
                <hr/>
            </div>
EOF;

        }
        
        return <<<EOF
 <div class="layui-row">
    <div class="layui-col-md10">
        {$label}
    </div>
</div>
EOF;

    }
}